package com.ruoyi.warehousemanager.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.entity.SysDept;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.ruoyi.common.annotation.Excels;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.annotation.Excel.Type;

import java.util.Date;

/**
 * 出库管理对象 j_out_warehouse
 *
 * @author h
 * @date 2023-06-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OutWarehouse extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 出库id */
    private Long outId;

    /** 出库物品id */

    private Long itemId;
    @Excels({
            @Excel(name="物品",targetAttr = "itemName",type = Type.EXPORT)
    })
    private Item item;
    private String itemName;
    private String deptName;

    /** 出库仓库id */

    private Long toWarehouseId;
    @Excels({
            @Excel(name="出库仓库",targetAttr = "deptName",type = Type.EXPORT)
    })
    private SysDept dept;

    /** 出库物品数量 */
    @Excel(name = "出库物品数量")
    private Long itemNum;

    @Excel(name = "待归还物品数量")
    private Long returnNum;

    /** 出库状态 */
    @Excel(name = "出库状态",readConverterExp = "0=不需要归还,1=需要归还")
    private String isReturn;

    /** 出库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date outTime;

    /** 归还时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date returnTime;

    /** 归还情况 */
    @Excel(name = "归还情况",readConverterExp = "0=未归还,1=部分归还,2=已归还,3=不需要归还")
    private String status;

    public void setOutId(Long outId)
    {
        this.outId = outId;
    }

    public Long getOutId()
    {
        return outId;
    }
    public void setItemId(Long itemId)
    {
        this.itemId = itemId;
    }

    public Long getItemId()
    {
        return itemId;
    }
    public void setToWarehouseId(Long toWarehouseId)
    {
        this.toWarehouseId = toWarehouseId;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public Long getToWarehouseId()
    {
        return toWarehouseId;
    }
    public void setItemNum(Long itemNum)
    {
        this.itemNum = itemNum;
    }

    public Long getItemNum()
    {
        return itemNum;
    }
    public void setReturnNum(Long returnNum)
    {
        this.returnNum = returnNum;
    }

    public Long getReturnNum()
    {
        return returnNum;
    }
    public void setIsReturn(String isReturn)
    {
        this.isReturn = isReturn;
    }

    public String getIsReturn()
    {
        return isReturn;
    }
    public void setOutTime(Date outTime)
    {
        this.outTime = outTime;
    }

    public Date getOutTime()
    {
        return outTime;
    }
    public void setReturnTime(Date returnTime)
    {
        this.returnTime = returnTime;
    }

    public Date getReturnTime()
    {
        return returnTime;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("outId", getOutId())
            .append("itemId", getItemId())
            .append("toWarehouseId", getToWarehouseId())
            .append("itemNum", getItemNum())
            .append("returnNum", getReturnNum())
            .append("isReturn", getIsReturn())
            .append("outTime", getOutTime())
            .append("returnTime", getReturnTime())
            .append("status", getStatus())
            .toString();
    }
}
